// background.js
// 背景图片轮换
function startBackgroundSlideshow() {
    const backgrounds = document.querySelectorAll('.background-layer');
    let currentIndex = 0;
    setInterval(() => {
        backgrounds[currentIndex].classList.remove('active');
        currentIndex = (currentIndex + 1) % backgrounds.length;
        backgrounds[currentIndex].classList.add('active');
    }, 6000); // 每6秒切换一次背景
}

window.startBackgroundSlideshow = startBackgroundSlideshow; 